<template>
  <div class="q-pa-md q-gutter-sm">
    <t-btn label="Click me" color="primary" @click="inception = true" />

    <t-dialog v-model="inception">
      <t-card>
        <t-card-section>
          <div class="text-h6">Inception</div>
        </t-card-section>

        <t-card-section class="q-pt-none">
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis
          laudantium minus earum totam modi laborum illo, corporis fuga saepe
          animi aliquam ea enim assumenda ut nulla natus aperiam quis. Iste.
        </t-card-section>

        <t-card-actions align="right" class="text-primary">
          <t-btn
            flat
            label="Open another dialog"
            @click="secondDialog = true"
          />
          <t-btn flat label="Close" v-close-popup />
        </t-card-actions>
      </t-card>
    </t-dialog>

    <t-dialog
      v-model="secondDialog"
      persistent
      transition-show="scale"
      transition-hide="scale"
    >
      <t-card class="bg-teal text-white" style="width: 300px">
        <t-card-section>
          <div class="text-h6">Persistent</div>
        </t-card-section>

        <t-card-section class="q-pt-none">
          Click/Tap on the backdrop.
        </t-card-section>

        <t-card-actions align="right" class="bg-white text-teal">
          <t-btn flat label="OK" v-close-popup />
        </t-card-actions>
      </t-card>
    </t-dialog>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        inception: ref(false),
        secondDialog: ref(false),
      };
    },
  };
</script>
